package demo;

import java.sql.ResultSet;
import java.sql.SQLException;

public class Dict {
	private int Id;
	private String Name;
	private String Val;
	
	public Dict() {
		super();
	}
	
	public Dict(ResultSet rs) {
		super();
		try {
			Id = rs.getInt("Id");
			Name = rs.getString("Name");
			Val = rs.getString("Val");
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
	
	public Dict(int id, String name, String val) {
		super();
		Id = id;
		Name = name;
		Val = val;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return Id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		Id = id;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return Name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		Name = name;
	}
	/**
	 * @return the val
	 */
	public String getVal() {
		return Val;
	}
	/**
	 * @param val the val to set
	 */
	public void setVal(String val) {
		Val = val;
	}

	@Override
	public String toString() {
		return "Id: " + this.Id + "\tName: " + this.Name + "\tVal: " + this.Val;
	}
	
}
